#ifndef _GRAPH_INTERFACE__
#define _GRAPH_INTERFACE__

#include <torch/extension.h>
#include <torch/custom_class.h>

namespace GraphData
{
  using std::tuple;
  using namespace torch;

  // tuple<Tensor, Tensor, Tensor, Tensor>
  // tensor_coo_to_csr_uw(Tensor &edge_list, const int64_t nvertex, bool directed);

  tuple<Tensor, Tensor, Tensor, Tensor, Tensor, Tensor>
  tensor_coo_to_csr(Tensor edge_list, optional<Tensor> edge_idx, bool directed);

  // tuple<> tensor_coo_to_chunk(Tetuple<Tensor, Tensor, Tensor,

  tuple<Tensor, Tensor, Tensor,
        Tensor, optional<Tensor>, Tensor,
        Tensor, Tensor, Tensor,
        Tensor, optional<Tensor>, Tensor, Tensor,
        optional<Tensor>, optional<Tensor>>
  tensor_coo_to_chunk(Tensor edge_list, optional<Tensor> edge_idx, const int64_t nvertex,  bool reorder);

  // tuple<Tensor, Tensor, Tensor,
  //       Tensor, Tensor, Tensor,
  //       Tensor, Tensor, Tensor,
  //       Tensor, Tensor>
  // tensor_coo_to_chunk_uw(Tensor edge_list, const int64_t nvertex, bool reorder);

  tuple<Tensor, Tensor, Tensor>
  tensor_coo_to_gcoo(Tensor edge_list, optional<Tensor> edge_idx);

  tuple<Tensor, Tensor>
  tensor_reorder(Tensor srcTn, Tensor dstTn, const int64_t nvertex);

  bool tensor_coo_check_directed(Tensor srcTn, Tensor dstTn);

  tuple<Tensor, Tensor, optional<Tensor>>
  tensor_coo_from_csr_index(Tensor rowPtrTn, Tensor colIndTn, Tensor rowIndTn, optional<Tensor> eidsTn);

};

#endif